Python Inner Class || Single Inner Class || Python
In this we are going to see a basic example of single inner class in Python Programming Language.



class Human:
    def __init__(self):
        self.name = 'Help For Coders'
        self.man = self.Man()

    class Man:
        def talk(self):
            return 'Talking Function'

h = Human()
print(h.name)
print(h.man.talk())

# Coded By Dhiraj Shelke


#ENJOY CODING


Post a Comment

FOR ANY DOUBTS AND ERRORS FEEL FREE TO ASK. YOUR DOUBTS WILL BE ADDRESSED ASAP

Previous Post Next Post